# Maintainer: David Runge <dvzrv@archlinux.org>

_name=flufl.testing
pkgname=python-flufl.testing
pkgver=0.8
pkgrel=6
pkgdesc="Random collection of testing helpers"
arch=('any')
url="https://gitlab.com/warsaw/flufl.testing"
license=('Apache')
depends=('python')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_name::1}/${_name}/${_name}-${pkgver}.tar.gz"{,.asc})
sha512sums=('edf491db72cccafef58e08b810e4c29962d14716cda3318a892a3ca36095b95477e7564aa4fe8eb4f3bd7cd9e7896f82282dd2d3a67900932848f1dc265cea61'
            'SKIP')
validpgpkeys=('8417157EDBE73D9EAC1E539B126EB563A74B06BF') # Barry Warsaw <barry@warsaw.us>

prepare() {
  mv -v "${_name}-${pkgver}" "$pkgname-$pkgver"
}

build() {
  cd "$pkgname-$pkgver"
  python setup.py build
}

package() {
  cd "$pkgname-$pkgver"
  python setup.py install --skip-build \
    --optimize=1 \
    --prefix=/usr \
    --root="${pkgdir}"
  install -vDm 644 {NEWS,README}.rst -t "${pkgdir}/usr/share/doc/${pkgname}"
}
